<h1>Listing documents</h1>

<table>
  <tr>
  	<th>ISBN</th>
    <th>Name</th>
    <th>Author</th>
    <th>Description</th>
    <th>Number</th>
    <th>Current number</th>
    <th>Document Type</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @documents.each do |document| %>
  <tr>
  	<td><%= document.isbn %></td>
    <td><%= document.name %></td>
    <td><%= document.author %></td>
    <td><%= document.description %></td>
    <td><%= document.number %></td>
    <td><%= document.current_number %></td>
    <td><%= document.document_type %></td>
    <td><%= link_to 'Show', document %></td>
    <td><%= link_to 'Edit', edit_document_path(document) %></td>
    <td><%= link_to 'Destroy', document, confirm: 'Are you sure?', method: :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Document', new_document_path %><br />
<%= link_to 'Back', librarian_path %>

